<extend name="Index/index" />
<block name='nav4'>layui-this</block>
<block name='main'>
	<div class="layui-col-md8 content detail">
		<div class="fly-panel detail-box">
			<h1>{$data['title']}</h1>
			<div class="fly-detail-info">
				<span class="layui-badge layui-bg-green fly-detail-column">动态</span>

				<span class="layui-badge layui-bg-red">精帖</span>

				<span class="fly-list-nums">
        <a href="#comment"><i class="iconfont" title="回答">&#xe60c;</i> 0</a>
        <i class="iconfont" title="人气">&#xe60b;</i> {$data['click_num']}
      </span>
			</div>
			<div class="detail-about">
				<a class="fly-avatar" href="##">
					<img src="https://tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg" alt="user">
				</a>
				<div class="fly-detail-user">
					<a href="../user/home.html" class="fly-link">
						<cite>{$data['author']}</cite>
					</a>
					<span>{$data['insert_at']}</span>
				</div>
				<div class="detail-hits" id="LAY_jieAdmin" data-id="123" style="height: 20px;">
				</div>
			</div>
			<div class="detail-body photos">
				{$data['details']}
			</div>
		</div>

		<div class="fly-panel detail-box" id="flyReply">
			<fieldset class="layui-elem-field layui-field-title" style="text-align: center;">
				<legend>回帖</legend>
			</fieldset>

			<ul class="jieda" id="jieda">

				<if condition="count($replys) gt 0">
					<foreach name='replys' item='v'>
					<li data-id="111" class="jieda-daan">
						<a name="item-1111111111"></a>
						<div class="detail-about detail-about-reply">
							<a class="fly-avatar" href="">
								<img src="__PUBLIC__/Admin/images/{$v['avatar']}" alt=" ">
							</a>
							<div class="fly-detail-user">
								<a href="##" class="fly-link">
									<cite>{$v['nickname']}</cite>
								</a>
								<if condition="$v['nickname'] eq $data['author']">
									<span style="color:#5FB878">(楼主)</span>
								</if>
								<if condition="$v['uid'] eq session('userid')">
									<span style="color:#5FB878">(我)</span>
								</if>
							</div>

							<div class="detail-hits">
								<span>{$v['reply_at']}</span>
							</div>

							<!--<i class="iconfont icon-caina" title="最佳答案"></i>-->
						</div>
						<div class="detail-body jieda-body photos">
							<p>{$v['reply_contents']}</p>
						</div>
						<!--<div class="jieda-reply">-->
						<!--<span class="jieda-zan zanok" type="zan">-->
						<!--<i class="iconfont icon-zan"></i>-->
						<!--<em>66</em>-->
						<!--</span>-->
						<!--<span type="reply">-->
						<!--<i class="iconfont icon-svgmoban53"></i>-->
						<!--回复-->
						<!--</span>-->
						<!--<div class="jieda-admin">-->
						<!--<span type="edit">编辑</span>-->
						<!--<span type="del">删除</span>-->
						<!--&lt;!&ndash; <span class="jieda-accept" type="accept">采纳</span> &ndash;&gt;-->
						<!--</div>-->
						<!--</div>-->
					</li>
					</foreach>
					<else />
					<!-- 无数据时 -->
					<li class="fly-none">消灭零回复</li>
				</if>
			</ul>
			<div class="layui-form layui-form-pane">
				<form action="{:U('Article/reply')}" method="post">
					<div class="layui-form-item layui-form-text">
						<a name="comment"></a>
						<div class="layui-input-block">
							<textarea id="L_content" name="reply_contents" required lay-verify="required" placeholder="请输入内容" class="layui-textarea fly-editor" style="height: 150px;"></textarea>
						</div>
					</div>
					<div class="layui-form-item">
						<input type="hidden" name="aid" id="" value="{$data['id']}" />
						<input type="hidden" name="uid" id="" value="<if condition='$Think.session.userid neq null'>{$Think.session.userid}</if>" />
						<button class="layui-btn" lay-filter="*" type="submit">提交回复</button>
					</div>
				</form>
			</div>
		</div>
	</div>
</block>